import '../constants/enum_constant.dart';

/// 基础实体
abstract class BaseModel {
  /// 实体状态
  ModelStateType modelState = ModelStateType.busy;

  /// Map转实体
  BaseModel.fromJson(Map<String, dynamic> data);

  ///实体转Map
  Map<String, dynamic> toJson();

  BaseModel();
}

class PagerModel {
  int page = 0;
  int total = 0;
  int size = 15;
  PagerModel.fromJson(Map<String, dynamic> data) {
    page = data["page"] ?? 0;
    total = data["total"] ?? 0;
  }
}
